Zum Hauptinhalt springen

Get UILM File

Used to fetch translation key-value pairs for a specific language and module. This API returns a JSON object containing all translation keys and their corresponding values for the specified language, module, and project.

API Endpoint

PropertyValue
Request MethodGET
Request URLhttps://api.seliseblocks.com/uilm/v1/Key/GetUilmFile

Request

Request Example

curl -X GET 'https://api.seliseblocks.com/uilm/v1/Key/GetUilmFile?Language=en-US&ModuleName=common&ProjectKey=YOUR_PROJECT_KEY' \
-H 'accept: text/plain' \
-H "x-blocks-key": YOUR_PROJECT_KEY

Request Headers

FieldTypeDescription
accept/Accepted response format.

Query Parameters

FieldTypeRequiredDescription
LanguagestringYesLanguage code (e.g., en-US, de-DE, bn-BD). Special case: Use key to display translation keys as values (e.g., APP_TODO: "APP_TODO"). This is useful when using the SELISE browser extension for development. Note: Before using key as a parameter, you must publish changes from SELISE Blocks Cloud.
ModuleNamestringYesName of the module to fetch translations for (e.g. common).
ProjectKeystringYesA unique identifier for the project. Maximum length: 64 characters.

Response

Success Response

Returns a JSON object containing key-value pairs for translations with HTTP status 200 OK.

{
"PASSWORD_TEST99": "Password Test is going on",
"FORGOT_PASSWORD": "Forgot password?",
"SIGN_UP": "\nSign up",
"LOG_IN": "Log in ",
"ENTER_YOUR_EMAIL": "Enter your email",
"SUCCESS": "Success",
"RESET_PASSWORD": "Reset password",
"CHOOSE_PASSWORD_SECURE_ACCOUNT": "Choose password to secure your account",
"ENTER_YOUR_PASSWORD": "Enter your password",
"CONFIRM_PASSWORD": "Confirm password",
"CONFIRM_YOUR_PASSWORD": "Confirm your password",
"CONFIRM": "Confirm",
"MY_PROFILE": "My Profile",
"DEVICES": "Devices",
"MOBILE_NO": "Mobile No.",
"CHANGE_PASSWORD": "Change password",
"UPDATE_PASSWORD": "Update Password",
"DEVICE": "Device",
"EDIT": "Edit",
"ERROR": "Error",
"FULL_NAME": "Full Name",
"SAVE": "Save",
"EMAIL": "Email",
"PASSWORD": "Password"
}

Response Structure

The response is a flat JSON object where:

  • Keys are translation identifiers (in UPPER_SNAKE_CASE format)
  • Values are the translated text strings in the requested language

Failure Response

{
"code": 400,
"message": {
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"ModuleName": [
"The ModuleName field is required."
]
},
"traceId": TRACE_ID
}
}
hinweis

If the x-blocks-key header is not included, the API will return a 200 OK response, but the data returned will not be specific to your project.

Error Response Fields

FieldTypeDescription
codeintError code.
messagestringError message details.

Error Codes

Status CodeDescriptionResponse Type
400Language or module name is not definedBad Request
401Project key is missing or invalidUnauthorized
404Endpoint URL is incorrect or resource not foundNot Found

Usage Notes

  • The response contains all translation keys for the specified module and language
  • Translation keys are returned in a flat structure for easy lookup
  • Empty or whitespace values may be present in some keys
  • The number of keys returned depends on the module configuration
  • Make sure to specify the correct language code format (e.g., en-US, not just en)

Development Mode with SELISE Browser Extension

For development and debugging purposes, you can use Language=key to retrieve translation keys as their own values:

# Development mode request
curl -X GET 'https://api.seliseblocks.com/uilm/v1/Key/GetUilmFile?Language=key&ModuleName=common&ProjectKey=YOUR_PROJECT_KEY' \
-H 'accept: */*'
-H "x-blocks-key": YOUR_PROJECT_KEY

This returns responses like:

{
"APP_TODO": "APP_TODO",
"DASHBOARD": "DASHBOARD",
"LOGIN": "LOGIN"
}

Setup steps:

  1. Add key as a language code in your project
  2. Publish the changes in the cloud
  3. Use the SELISE browser extension to view translation keys in your application
  4. This helps identify which keys are being used where during development